package org.eiahe.hr.salary.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.core.xss.Xss;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.salary.domain.SalaryAdjustmentRecord;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 调薪记录业务对象 hr_salary_adjustment_record
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SalaryAdjustmentRecord.class, reverseConvertGenerate = false)
public class SalaryAdjustmentRecordBo extends BaseEntity {

    /**
     * 调薪记录ID
     */
    @NotNull(message = "调薪记录ID不能为空", groups = { EditGroup.class })
    private Long recordId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 工号
     */
    @NotBlank(message = "工号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String employeeNo;

    /**
     * 调薪次数
     */
    private Integer adjustmentCount;

    /**
     * 调薪时间
     */
    @NotNull(message = "调薪时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date adjustmentTime;

    /**
     * 调薪幅度
     */
    private BigDecimal adjustmentAmount;

    /**
     * 调薪比例
     */
    private BigDecimal adjustmentRate;

    /**
     * 调薪原因
     */
    private String adjustmentReason;

    /**
     * 原薪资
     */
    private BigDecimal originalSalary;

    /**
     * 新薪资
     */
    private BigDecimal newSalary;

    /**
     * 备注
     */
    @Xss(message = "备注不能包含脚本字符")
    private String remark;
}